class Transaction < ActiveRecord::Base
  after_create :update_order
  private
  def update_order
    order = Order.find_by(order_no: order_no)
    order.update(pay_amount: price, status: 1)
  end
end
